Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support converting varchar to nvarchar for mssql database (#24105) #24168

Merged

Conversation

GiteaBot
Copy link
Contributor

Backport #24105 by @lunny

In #12269, all string fields of struct will generate a NVARCHAR column in database, but for those Gitea instances installed before that PR, users have to convert columns themselves.

In this PR, we update the ./gitea admin convert commands to support both MySQL and MSSQL database converting. Previously, it only supported converting utf8 -> utf8mb4 for MySQL.
Now, it will check the database types.
If it's MSSQL, it will convert VARCHAR -> NVARCHAR as well.

@GiteaBot GiteaBot added the topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile label Apr 17, 2023
@GiteaBot GiteaBot added this to the 1.19.2 milestone Apr 17, 2023
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Apr 17, 2023
@yardenshoham
Copy link
Member

Gonna use this PR to check something with labels real quick

@yardenshoham yardenshoham added outdated/backport/v1.19 This PR should be backported to Gitea 1.19 and removed outdated/backport/v1.19 This PR should be backported to Gitea 1.19 labels Apr 17, 2023
@yardenshoham
Copy link
Member

Done

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Apr 17, 2023
@techknowlogick techknowlogick enabled auto-merge (squash) April 17, 2023 14:08
@techknowlogick techknowlogick merged commit c4f569b into go-gitea:release/v1.19 Apr 17, 2023
@techknowlogick techknowlogick deleted the backport-24105-v1.19 branch April 17, 2023 14:15
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jul 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants